package edu.gyc.collectionhomework;

import java.util.HashSet;
import java.util.Random;

public class MyRandom {
    public static void main(String[] args) {
        Random random = new Random();
        HashSet<Integer> data = new HashSet<>();
        for (int i = 0; i < 10; i++) {
            data.add(random.nextInt(20) + 1);
        }
        System.out.println(data.size());
        System.out.println(data);
    }
}
